import { Bot, Context, Schema } from 'koishi'
import { } from '@koishijs/plugin-adapter-qq'
import QQManager from './manager/qqManager'

export const name = 'selectgal'

export interface Config { }

export const Config: Schema<Config> = Schema.object({})


const qqManager = new QQManager();


export function apply(ctx: Context) {
    // write your plugin here
    ctx.on('message', (session) => {


        if (session.qq) {
            qqManager.createRequest(session);
        } else {
            const text = session.content;
            if (text == '111') {
                const str = `111222`;
                session.send(str);
            }
        }

        // console.log(session);
    })
}
